{extend name="base/base" /}
{block name="head"}{__block__}{/block}
{block name="others"}
<style>
        input{
            background: rgba(0,0,0,0);
            border: 0 !important;
            width: 100%;
            outline: none;
        }
        .arrows {
            width: 6px;
            height: 6px;
            margin:0 18px;
            border-top: 1px solid #000000;
            border-right: 1px solid #000000;
            transform: rotate(45deg);
        }
        .arrow-left {
            transform: rotate(-135deg);
        }
        .two-tcontent-next .wk-list {
            height: auto;
            padding: 20px 0;
        }
        .two-tcontent-next .wk-list-text .name7 {
            width: 7%;
        }
        .two-tcontent-next .wk-list-text .name6 {
            width: 13%;
        }
        .two-tcontent-next .wk-list-text .name1 {
            width: 20%;
        }
        .two-tcontent-next .wk-list-text .name4 {
            width: 13.67%;
        }
        .two-tcontent-next .wk-list-text .name1s {
            color: #1a4fc9;
        }
        .two-tcontent-next .wk-list-text .name8 {
            width: 6%;
        }
        .two-tcontent-next {
            height: auto;
        }
        .wk-btns-page-wrap {
            width: 100%;
            height: 50px;
            cursor: pointer;
        }
        .wk-btns-page-wrap .num-page {
            margin: 0 20px;
            cursor: pointer;
        }
        .wk-btns-page-wrap .skip-page-nums {
            margin-left: 6%;
            color: #606266;
            font-size: 12px;
        }
        .wk-btns-page-wrap .skip-page-nums .inp-wrap {
            width: 60px;
            height: 38px;
            margin: 0 10px;
        }
        .btns-addes-wrap {
            width: 180px;
            height: 28px;
            border: 1px solid #e2e8f0;
            border-radius: 2px;
            overflow: hidden;
        }
        .btns-addes-wrap .add-btn {
            width: 33.333%;
            height: 28px;
            color: #606266;
            font-size: 12px;
            cursor: pointer;
            border-right: 1px solid #e2e8f0;
        }

        .btns-addes-wrap .add-btn-in {
            background: rgb(26, 79, 201);
            color: #ffffff;
        }
        .zhgl-wrap {
            width: 100%;
            margin-bottom: 20px;
            background: #ffffff;
        }
        .zhgl-wrap .zhgl-name {
            width: 100%;
            height: 55px;
            padding: 0 30px;
            box-sizing: border-box;
            border-bottom: 1px solid #f0f6fb;
            color: #000000;
        }
        .zhgl-wrap .zhgl-content-wrap {
            width: 100%;
            padding: 30px;
            box-sizing: border-box;
        }
        .zhgl-wrap .zhgl-content-wrap .zhgl-lst {
            width: 49%;
        }
        .name-wsl {
            width: 100%;
            margin-bottom: 6px;
            font-size: 14px;
        }
        .name-wsl .blue {
            color: #1a4fc9;
        }
        .zhgl-content-wrap .zhgl-lst-one {
            width: 49%;
            border: 1px solid #f0f6fb;
            padding: 20px 30px;
            padding-top: 26px;
            box-sizing: border-box;
            flex-wrap: wrap;
        }
        .zhgl-content-wrap .zhgl-lst-one .zl-name {
            color: #000000;
            font-size: 12px;
            margin-bottom: 2px;
        }
        .zhgl-content-wrap .zhgl-lst-one .money {
            font-size: 20px;
            margin-bottom: 12px;
            color: #000000;
        }
        .zhgl-content-wrap .zhgl-lst-two {
            width: 100%;
            border: 1px solid #f0f6fb;
            padding: 10px 16px;
            box-sizing: border-box;
        }
        .zhgl-content-wrap .zhgl-lst-two .two-next-biu {
            width: 100%;
            margin-bottom: 8px;
            color: #000000;
        }
        .zhgl-content-wrap .zhgl-lst-two .two-next-biu .biu-one {
            width: 44%;
        }
        .zhgl-content-wrap .zhgl-lst-two .two-next-biu .biu-one1 {
            width: 28%;
            text-align: left;
        }
        .zhgl-content-wrap .zhgl-lst-two .two-next-biu .biu-one2 {
            width: 28%;
            text-align: right;
        }
        .kline-imgsss {
            width: 200px;
            height: 124px;
        }






        .abs-abs-content {
            height: 20px;
            border-radius: 14px;
            border: 1px solid #e2e8f0;
            margin-left: 8px;
            padding: 0 10px;
            font-size: 10px;
            cursor: pointer;
        }
        .abs-abs-content .hy-icon {
            margin-left: 4px;
            width: 10px;
        }
        .alert-qianming {
            color: #1a4fc9;
            font-size: .75rem;
            margin-left: .5rem;
            cursor: pointer;
        }
        .model-type {
            width: 100%;
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
            background: rgba(0,0,0,0.4);
        }
        .model-type .sign-content-wrap {
            position: relative;
            box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
            width: 50%;
            background: #ffffff;
            padding: 28px;
            box-sizing: border-box;
            border-radius: 4px;
        }
        .model-type .sign-content-wrap .sign-close {
            position: absolute;
            cursor: pointer;
            font-size: 18px;
            top: 28px;
            right: 28px;
        }
        .model-type .sign-content-wrap .sign-text {
            line-height: 24px;
            font-size: 18px;
            color: #303133;
            text-align: center;
            margin-bottom: 30px;
        }
        .model-type .sign-content-wrap .sign-tishi {
            color: #606266;
            font-size: 14px;
            word-break: break-all;
            margin-bottom: 20px;
        }
        .model-type .sign-content-wrap .sign-teart-content {
            width: 100%;
            margin-bottom: 16px;
            color: #606266;
            font-size: 14px;
            word-break: break-all;
        }
        .model-type .sign-content-wrap .sign-teart-content .teart-left {
            width: 20%;
            color: #606266;
            font-size: 14px;
            word-break: break-all;
        }
        .model-type .sign-content-wrap .sign-teart-content .teart-left .xing {
            color: #e53e3e;
            font-size: 10px;
            margin-left: 8px;
        }
        .model-type .sign-content-wrap .sign-teart-content .teart-right {
            width: 80%;
        }
        .model-type .sign-content-wrap .sign-teart-content .teart-right .news-content {
            background-color: rgba(247,250,252,1);
            padding: 10px;
            width: 230px;
            color: rgba(45,55,72,var(--text-opacity));
            font-size: 12px;
            border-radius: 4px;
        }
        .model-type .sign-content-wrap .sign-teart-content .teart-right .inp-wrap {
            border-radius: 4px;
            border: 1px solid #dcdfe6;
            width: 100%;
            height: 30px;
            padding: 0 16px;
            box-sizing: border-box;
        }
        .model-type .sign-content-wrap .sign-tishi-title {
            color: #e53e3e;
            font-size: 12px;
            margin-bottom: 30px;
        }
        .model-type .sign-content-wrap .btns-sign {
            color: #fff;
            background-color: #409eff;
            border-color: #409eff;
            font-size: 14px;
            width: 120px;
            height: 40px;
            border-radius: 4px;
            cursor: pointer;
            margin: 0 auto;
        }

        @media screen and (max-width:822px){
            .two-tcontent-next {
                padding-bottom: 60px;
            }
            .wk-btns-page-wrap{
                position: absolute;
                left: 0;
            }
            .wk-btns-page-wrap .num-page {
                margin: 0 4px;
            }
            .zhgl-wrap .zhgl-content-wrap{
                flex-wrap: wrap;
            }
            .zhgl-content-wrap .zhgl-lst-one {
                width: 100%;
            }
            .zhgl-wrap .zhgl-content-wrap {
                padding: 12px;
            }
            .zhgl-wrap .zhgl-content-wrap .zhgl-lst {
                width: 100%;
            }
            .wk-select-wrap {
                padding: 0;
            }
            .model-type .sign-content-wrap {
                width: 90%;
                height: 80vh;
                overflow-y: auto;
            }
        }
    </style>
{/block}
{block name="header"}{__block__}{/block}
{block name="body"}


    <div class="botom-content-wrap">
        <div style="margin-bottom: 20px;color: #000000" class="flex-l">
            <div>{$uinfo.address}</div>
            
			{if $uinfo.tag}
			<div class="flex-center abs-abs-content">
                <div>{$uinfo.tag}</div>
                <img src="/static/assets/images/signed.svg" class="hy-icon" alt="">
            </div>
			{/if}
			<div class="alert-qianming" @click="signStatus=true;" data-i18n="address_t8">></div>
		</div>
		
        <div class="zhgl-wrap">
            <div class="zhgl-name flex-l" data-i18n="miner_t1">Miner Overview</div>
            <div class="zhgl-content-wrap flex-lr">
                <div class="zhgl-lst-one flex-l">
                    <div class="kline-imgsss" id="js_kline_bin"></div>
                    <div>
						<div class="zl-name" data-i18n="miner_t2">Address Balance</div>
						<div class="money">{$uinfo.amount} WD</div>
						<div class="zl-name flex-l"><span data-i18n="miner_t3">Available Balance</span> : {$uinfo.amount} WD</div>
						<div class="zl-name flex-l"><span data-i18n="miner_t4">Initial Pledge</span>: {$uinfo.pleg_amount} WD</div>
						<div class="zl-name flex-l"><span data-i18n="miner_t5">Locked Rewards</span>: {$uinfo.lock_amount} WD</div>
					</div>
				</div>
                <div class="zhgl-lst-one">
                    <div class="zl-name" data-i18n="miner_t6">Adjusted Power</div>
                    <div class="money flex-lr">
                        <div>{$uinfo.QualityAdjPower}</div>
                    </div>
                    <div class="zl-name flex-lr">
                        <div><span data-i18n="miner_t7">Raw Byte Power</span>: {$uinfo.RawBytePower}</div>
                        <div><span data-i18n="miner_t8">Win Count</span>: {$uinfo.blocks_num}</div>
                    </div>
                    <div class="zl-name flex-lr">
                        <div><span data-i18n="miner_t9">Total Reward</span>: {$minfo.totalRewards} WD</div>
                        <div><span data-i18n="miner_t10">Sector Size</span>: {$uinfo.SectorSize}</div>
                    </div>
                </div>
            </div>
        </div>
		
        <div class="zhgl-wrap">
            <div class="zhgl-name flex-lr">
                <div data-i18n="miner_t11">Mining Data</div>
                <div class="btns-addes-wrap flex-center">
                    <div class="add-btn flex-center add-btn-in">24H</div>
					<!--
                    <div class="add-btn flex-center">7Day</div>
                    <div class="add-btn flex-center">30Day</div>
                    <div class="add-btn flex-center">1Year</div>
					-->
                </div>
            </div>
            <div class="zhgl-content-wrap flex-lr">
                <div class="zhgl-lst-two">
                    <div class="two-next-biu flex-l">
                        <div class="biu-one"><span data-i18n="miner_t12">Power Growth</span>: {$minfo.qualityAdjPowerGrowth}</div>
                        <div class="biu-one1"><span data-i18n="miner_t13">Daily Power Growth</span>: {$minfo.rawBytePowerGrowth}</div>
                        <div class="biu-one2"><span data-i18n="miner_t14">Miner Equivalent</span>: {$minfo.qualityAdjPowerDelta}</div>
                    </div>
                    <div class="two-next-biu flex-l">
                        <div class="biu-one"><span data-i18n="miner_t15">Blocks Mined</span>: {$minfo.blocksMined}</div>
                        <div class="biu-one1"><span data-i18n="miner_t9">Win Count</span>: {$minfo.totalRewards} WD</div>
                        <div class="biu-one2"><span data-i18n="miner_t17">Rewards (Ratio)</span>: {$minfo.durationPercentage}</div>
                    </div>
                    <div class="two-next-biu flex-l">
                        <div class="biu-one"><span data-i18n="miner_t18">Mining Efficiency</span>: N/A</div>
                        <div class="biu-one1"><span data-i18n="miner_t19">WindowedPoSt Cost</span>: N/A</div>
                        <div class="biu-one2"><span data-i18n="miner_t20">Lucky Value</span>: {$minfo.luckyValue}</div>
                    </div>
                </div>
            </div>
        </div>
		
        <div class="content-one-wrap">
            <div class="two-tcontent-next" style="height:auto;">
                <div class="wk-list-text flex-lr">
					<div class="name3" style="width:20%;" data-i18n="message_t2"></div>
                    <div class="name1" data-i18n="message_t3"></div>
                    <div class="name2" style="width:20%;" data-i18n="message_t4"></div>
                    <div class="name3" style="width:20%;" data-i18n="message_t5"></div>
					<div class="name3" style="width:20%;" data-i18n="message_t6"></div>
                    <div class="name4" data-i18n="message_t7"></div>
                    <div class="name6" data-i18n="message_t8"></div>
                    <div class="name7" data-i18n="message_t9"></div>
                </div>
			{foreach $data as $key=>$cd }
                <div class="wk-list-text wk-list flex-lr">
					<div class="name3" style="width:20%;"><a href="/index/block/index/cid/{$cd.message_cid}">{$cd.message_cid}</a></div>
                    <div class="name1 name1s"><a href="/index/tipset/detail/id/{$cd.height}">{$cd.height}</a></div>
                    <div class="name2" style="width:20%;">{$cd.timestamp}</div>
					<div class="name3" style="width:20%;"><a href="/index/address/index/address/{$cd.From}">{$cd.From}</a></div>
					<div class="name3" style="width:20%;"><a href="/index/address/index/address/{$cd.To}">{$cd.To}</a></div>
					<div class="name4">{$cd.Method}</div>
                    <div class="name6">{$cd.Value}</div>
                    <div class="name7">OK</div>
                </div>
			{/foreach}
				
			<div class="col-xs-12">
			<ul class="pager wizard">
						<li class="previous first"><a href="?page=1"><<</a></li>
						<li class="previous"><a href="?page={$page.pre}"><</a></li>
						<li class="finish"><a href="javascript:;">{$page.this}</a></li>
						<li class="finish">
						<span data-i18n="sp_to"></span>
						<input onchange="location='?page='+value" style="width:40px;" type="text" name="page_id" id="page_id" value="{$page.this}">
						<span data-i18n="sp_y"></span>
						</li>
						<li class="next last"><a href="?page={$page.next_last}">>></a></li>
						<li class="next"><a href="?page={$page.next}">></a></li>
					</ul>
			</div>
			
            </div>
        </div>
		
    </div>
	
	
    <div v-if="signStatus" class="model-type flex-center">
        <div class="sign-content-wrap">
            <div class="sign-close" @click="signStatus = false">x</div>
            <div class="sign-text" data-i18n="address_t8">Signature verification</div>
            <div class="sign-tishi"></div>
            <div class="flex-top-l sign-teart-content">
                <div class="teart-left flex-l">
                    <div><span data-i18n="sp_address">Owner address</span></div>
                    <div class="xing">*</div>
                </div>
                <div class="teart-right">
                    {$uinfo.address}
                </div>
            </div>
            <div class="flex-top-l sign-teart-content">
                <div class="teart-left flex-l">
                    <div data-i18n="address_t1">Account name(En)</div>
                    <div class="xing">*</div>
                </div>
                <div class="teart-right">
                    <div class="inp-wrap flex-l">
                        <input type="text" id="accname_en">
                    </div>
                </div>
            </div>
            <div class="flex-top-l sign-teart-content">
                <div class="teart-left flex-l">
                    <div data-i18n="address_t2">Account name(Zh)</div>
                </div>
                <div class="teart-right">
                    <div class="inp-wrap flex-l">
                        <input type="text" id="accname_zh">
                    </div>
                </div>
            </div>
            <div class="flex-top-l sign-teart-content">
                <div class="teart-left flex-l">
                    <div data-i18n="address_t3">Contact</div>
                    <div class="xing">*</div>
                </div>
                <div class="teart-right">
                    <div class="inp-wrap flex-l">
                        <input type="text" id="contact">
                    </div>
                </div>
            </div>
            <div class="flex-l sign-teart-content">
                <div class="teart-left flex-l">
                    <div data-i18n="address_t4">Message</div>
                </div>
                <div class="teart-right">
                    <div class="news-content">
                        <div>Signature For WorldDataBase</div>
                        <div>{$uinfo.address}</div>
                        <div>{$uinfo.sign_time}</div>
                    </div>
                </div>
            </div>
            <div class="flex-l sign-teart-content">
                <div class="teart-left flex-l">
                    <div data-i18n="address_t5">Sign code</div>
                </div>
                <div class="teart-right">
                    <div class="news-content" style="width: 100%;overflow-x: scroll;overflow-y: hidden;height: 50px;white-space:nowrap;padding:8px">
                        <div>{$uinfo.sign_code}</div>
                    </div>
                </div>
            </div>
            <div class="flex-top-l sign-teart-content">
                <div class="teart-left flex-l">
                    <div data-i18n="address_t6">Signature</div>
                    <div class="xing">*</div>
                </div>
                <div class="teart-right">
                    <div class="inp-wrap flex-l">
                        <input type="text" id="signature" placeholder="Please copy the above sign code, sign it with Filecoin wallet, and enter the signature" >
                    </div>
                </div>
            </div>
            <div class="sign-tishi-title">Special notes: sensitive words, prohibited words, celebrity names, etc. are not allowed in account names. If there is any violation, the signature will be deleted and prohibited. Thank you for your cooperation.</div>
            <div class="btns-sign flex-center" data-i18n="address_t7" @click="signStatus = false;sub_act();">Submit</div>
        </div>
    </div>
	
{/block}
{block name="footer"}
</div>
    <div class="footer-bottom-wrap">
        <div class="bottom-bubu flex-center">© 2020 WorldDataBase Project. All Rights Reserved.</div>
    </div>
	
    <script src="/static/assets/js/vue.js"></script>
    <script type="text/javascript">
		init_bui();
		
		function sub_act()
		{
			var owner_address = "{$uinfo.address}";
			
			var accname_en = $("#accname_en").val();
			var accname_zh = $("#accname_zh").val();
			
			var contact = $("#contact").val();
			var signature = $("#signature").val();
			
			if(accname_en=="" | accname_zh=="" | contact=="" | signature=="")
			{
				return alert("Please confirm whether the parameters are correct.");
			}
			$.ajax({
				url:"/index/address/usign",
				data:{owner_address:owner_address,accname_en:accname_en,accname_zh:accname_zh,contact:contact,signature:signature},
				type:"POST",
				datatype:"JSON",
				success:function(msg){
					alert('Submitted successfully, please wait for review.');
				},
				error:function(msg){
					alert('UnknowError');
				}
			});
			
			
			
		}
		
		
		function fl_lng()
		{
			$('body').i18n();
		}
		
		function echar()
		{
			var doms = document.getElementById('js_kline_bin');
			var myCharts = echarts.init(doms);
			var options = {
				title: {
					left: 'center'
				},
				tooltip: {
					trigger: 'item'
				},
				legend: {
					orient: 'vertical',
					left: 'left',
				},
				series: [
					{
						name: 'Address Balance',
						type: 'pie',
						radius: '50%',
						data: [
							{value: {$uinfo.amount}, name: 'Available Balance'},
							{value: {$uinfo.pleg_amount}, name: 'Initial Pledge'},
							{value: {$uinfo.lock_amount}, name: 'Locked Rewards'},
						],
						emphasis: {
							itemStyle: {
								shadowBlur: 10,
								shadowOffsetX: 0,
								shadowColor: 'rgba(0, 0, 0, 0.5)'
							}
						}
					}
				]
			};
			if (options && typeof options === "object") {
				myCharts.setOption(options, true);
			}
		}
		
        function init_bui() {
            var _vue = new Vue({
                el: '#app',
                data: {
					signStatus:false,
                    shrinkStatus: false,
                    shrinkStatus1: false,
                    selectStatus: false,
                    langState: false,
                    selextIx: null,
                    kgStatus: false,
					data: [],
                },
                created() {
				
                },
                mounted() {
                    //this.init();
					echar();
                },

                methods: {
				    init(){
					}
                },
            })
        }
		
    </script>
</html>
{/block}